home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / bin / pcre-config < prev    next >
Text File  |  2005-10-18  |  1KB  |  67 lines

  1. #!/bin/sh
  2.  
  3. prefix=/usr
  4. exec_prefix=${prefix}
  5. exec_prefix_set=no
  6.  
  7. usage="\
  8. Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
  9.  
  10. if test $# -eq 0; then
  11.       echo "${usage}" 1>&2
  12.       exit 1
  13. fi
  14.  
  15. libR=
  16. case `uname -s` in
  17.   *SunOS*)
  18.   libR=" -R${exec_prefix}/lib"
  19.   ;;
  20. esac
  21.  
  22. while test $# -gt 0; do
  23.   case "$1" in
  24.   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  25.   *) optarg= ;;
  26.   esac
  27.  
  28.   case $1 in
  29.     --prefix=*)
  30.       prefix=$optarg
  31.       if test $exec_prefix_set = no ; then
  32.         exec_prefix=$optarg
  33.       fi
  34.       ;;
  35.     --prefix)
  36.       echo $prefix
  37.       ;;
  38.     --exec-prefix=*)
  39.       exec_prefix=$optarg
  40.       exec_prefix_set=yes
  41.       ;;
  42.     --exec-prefix)
  43.       echo $exec_prefix
  44.       ;;
  45.     --version)
  46.       echo 6.3
  47.       ;;
  48.     --cflags | --cflags-posix)
  49.       if test ${prefix}/include != /usr/include ; then
  50.         includes=-I${prefix}/include
  51.       fi
  52.       echo $includes
  53.       ;;
  54.     --libs-posix)
  55.       echo -L${exec_prefix}/lib$libR -lpcreposix -lpcre
  56.       ;;
  57.     --libs)
  58.       echo -L${exec_prefix}/lib$libR -lpcre
  59.       ;;
  60.     *)
  61.       echo "${usage}" 1>&2
  62.       exit 1
  63.       ;;
  64.   esac
  65.   shift
  66. done
  67.